<%@page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/easyui/themes/myself/easyui.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/easyui/themes/icon.css" />
<%@ include file="../common/taglibs.jsp"%>
<%@ include file="../common/meta.jsp"%>
<script>
	$(function() {
		$("#roleTree")
			.tree({
				url : './list.action',
				animate : true,

				onClick : function(node) {
					if (node.id == '0') {
						$("#content")
								.attr("src",
										"./edit.action?operate=insertSub&role.roleId=0");
					} else {
						$("#content").attr("src",
								"./edit.action?roleId=" + node.id);
					}
				},
				onLoadSuccess : function(node) {
					if (node != undefined && node != null) {
						if (node.id == '0') {
							$("#content")
									.attr("src",
											"./edit.action?operate=insertSub&role.roleId=0");
						} else {
							$("#content").attr(
									"src",
									"./edit.action?roleId="
											+ node.id);
						}
					}
				}
			});
	$("<div class=\"datagrid-mask\"></div>").css({display:"block",width:"100%",height:$(window).height()}).appendTo("body");
	$("<div class=\"datagrid-mask-msg\"></div>").html("正在处理，请稍候。。。").appendTo("body").css({display:"block",left:($(document.body).outerWidth(true) - 190) / 2,top:($(window).height() - 45) / 2});
	
	});
</script>
</head>
<body class="easyui-layout">
	<div id="tree"
		data-options="region:'west',title:'角色',split:true,border:false"
		style="padding: 3px 8px 10px 3px; overflow: hidden; margin: 0; width: 250px;">
		<ul class="easyui-tree" id="roleTree" />
	</div>
	<div data-options="region:'center',title:'角色详情',fit:true,border:false"
		style="padding: 5 5 0 5px; background: #edf7ff">
		<iframe id="content" width="100%" height="100%" frameborder="0"
			scrolling="auto" marginheight="0" marginwidth="0" />
	</div>
</body>
</html>

